<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<x:parse xml="${param.xmlstr}" var="xmlData" />
<c:set var="grant_code">
	<x:out select="$xmlData/data/proposal/grant_code" />
</c:set>
<c:set var="sub_grant_code">
	<x:out select="$xmlData/data/proposal/sub_grant_code" />
</c:set>


<div class="t_bar">
	上年度对无锡市单位开展知识产权培训场次：<input type="text"
		name="trains/train_sum" id="train_sum" class=" gray" disabled
		label="培训场次" style="text-align:right;  width: 100px;"
		value="<x:out select="$xmlData/data/trains/train_sum" />" />次
</div>
<table id="tblTrains" cellpadding="0" class="table01" width="100%"
	border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;">
	<thead>
		<tr style="border: 1px solid #B7D1E6">
			<th class="TblHead" align="center" width="5%">选择</th>
			<th class="TblHead" align="center" width="5%">序号</th>
			<th class="TblHead" align="center" width="15%">培训时间</th>
			<th class="TblHead" align="center" width="50%">接受培训的单位名称</th>
			<th class="TblHead" align="center" width="15%">讲座（培训）题目</th>
			<th class="TblHead" align="center" width="10%">参加人数</th>

		</tr>
	</thead>
	<tbody id="tab">
		<tr style="display: none">
			<td align="center"><input type="radio" class="radiobutton"
				name="selTrains">
			</td>
			<td align="center"><span name="trains|train[0]@seq_no">[index]</span>
			</td>
			<td align="center"><input id="train_date_[0]"
				name="trains|train[0]|date" label="培训时间" value=""
				class=" required input_text date " style="width: 70px" />
			</td>
			<td align="center"><input name="trains|train[0]|org_name"
				class="input_text required" maxlength=50 style="width:90%"
				label="接受培训的单位名称" value="">
			</td>
			<td align="center"><input name="trains|train[0]|cname"
				class="input_text required" maxlength=50 style="width:90%"
				label="讲座（培训）题目" value="">
			</td>
			<td align="center"><input
				name="trains|train[0]|people_sum" class="input_text required"
				style="text-align:right; width: 100px" label="参加人数"
				onfocus="InitInput.setNumber(this,7,0,0)" value="">
			</td>


			<c:set value="0" var="index" scope="page" />
			<x:forEach select="$xmlData/data/trains/train" var="train">

				<c:choose>
					<c:when test="${index<10}">
						<c:set value="0" var="flag" scope="page" />
					</c:when>
					<c:otherwise>
						<c:set value="" var="flag" scope="page" />
					</c:otherwise>
				</c:choose>
				<tr>
					<td align="center"><input type="radio" class="radiobutton"
						name="selTrains">
					</td>
					<td align="center"><span
						name="trains/train[${flag}${index}]@seq_no"><x:out
								select="$train/@seq_no" /></span>
					</td>
					<td align="center"><c:set var="date" scope="page">
							<x:out select="$train/date" />
						</c:set> <input value="${date}" id="train_date_[${flag}${index}]"
						label="培训时间" name="trains/train[${flag}${index}]/date"
						class="required date input_text " style="width: 70px" />
					</td>
					<td align="center"><input
						name="trains/train[${flag}${index}]/org_name"
						class="input_text required" maxlength=50 style="width:90%"
						label="接受培训的单位名称" value="<x:out select="$train/org_name"/>" />
					</td>
					<td align="center"><input
						name="trains/train[${flag}${index}]/cname"
						class="input_text required" maxlength=50 style="width:90%"
						label="讲座（培训）题目" value="<x:out select="$train/cname"/>" />
					</td>
					<td align="center"><input
						name="trains/train[${flag}${index}]/people_sum"
						class="input_text required"
						onfocus="InitInput.setNumber(this,7,0,0)" style="text-align:right; width: 100px"
						label="参加人数" value="<x:out select="$train/people_sum"/>" />
					</td>


				</tr>
				<c:set value="${index+1}" var="index" scope="page" />
			</x:forEach>
			<script type="text/javascript">
				showAllDateTag("tblTrains");
			</script>
	</tbody>
</table>
<br>

<table width="98%" align="center">
	<tr>
		<td><input class="button" name="cmdAddbefore" type=button
			value="添加"
			onclick="addNewRow('tblTrains');showDateTag('tblTrains');getLength('tblTrains','train_sum');">
			<input class="button" name="cmdMovePrev" type=button value="上移"
			onclick="movePrev('tblTrains','selTrains')"> <input
			class="button" name="cmdMoveNext" type=button value="下移"
			onclick="moveNext('tblTrains','selTrains')"> <input
			class="button" name="cmddel" type=button value="删除"
			onclick="deleteSelectedRow('tblTrains','上年度对无锡市单位开展知识产权培训');getLength('tblTrains','train_sum');">
		</td>
	</tr>
</table>

<br>
<div class="t_bar">
	上年度开展大型知识产权论坛、研讨会场次：<input type="text"
		name="forums/forum_sum" id="forum_sum" class=" gray" disabled
		label="场次" style="text-align:right;  width: 100px;"
		value="<x:out select="$xmlData/data/forums/forum_sum" />" /> 次，举办总经费<input
		type="text" name="forums/budget_total" id="budget_total" class=" gray"
		disabled label="总经费" style="text-align: right; width: 100px;"
		value="<x:out select="$xmlData/data/forums/budget_total" />" />万元
</div>
<table id="tblForums" cellpadding="0" class="table01" width="100%"
	border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;">
	<thead>
		<tr style="border: 1px solid #B7D1E6">
			<th class="TblHead" align="center" width="5%">选择</th>
			<th class="TblHead" align="center" width="5%">序号</th>
			<th class="TblHead" align="center" width="15%">活动时间</th>
			<th class="TblHead" align="center" width="40%">活动名称</th>
			<th class="TblHead" align="center" width="10%">参加人数</th>
			<th class="TblHead" align="center" width="15%">联合举办单位</th>
			<th class="TblHead" align="center" width="10%">举办经费<br/>（万元）</th>
		</tr>
	</thead>
	<tbody id="tab">
		<tr style="display: none">
			<td align="center"><input type="radio" class="radiobutton"
				name="selForums">
			</td>
			<td align="center"><span name="forums|forum[0]@seq_no">[index]</span>
			</td>
			<td align="center"><input name="forums|forum[0]|date"
				id="forum_date_[0]" label="活动时间" value=""
				class=" required input_text date " style="width: 70px" />
			</td>
			<td align="center"><input name="forums|forum[0]|cname"
				class="input_text required" maxlength=50 style="width:90%"
				label="活动名称" value="">
			</td>
			<td align="center"><input
				name="forums|forum[0]|people_sum" class="input_text required"
				style="text-align:right;  width: 100px" label="参加人数"
				onfocus="InitInput.setNumber(this,7,0,0)" value="">
			</td>
			<td align="center"><input name="forums|forum[0]|org_name"
				class="input_text required" maxlength=50 style="width: 100px"
				label="联合举办单位" value="">
			</td>
			<td align="center"><input name="forums|forum[0]|budget"
				class="input_text required" maxlength=50
				onfocus="InitInput.setNumber(this,7,4,2)"
				onchange="countTable('tblForums','budget_total',6)"
				style="text-align: right; width: 100px" label="举办经费" value="">
			</td>



			<c:set value="0" var="index" scope="page" />
			<x:forEach select="$xmlData/data/forums/forum" var="forum">

				<c:choose>
					<c:when test="${index<10}">
						<c:set value="0" var="flag" scope="page" />
					</c:when>
					<c:otherwise>
						<c:set value="" var="flag" scope="page" />
					</c:otherwise>
				</c:choose>
				<tr>
					<td align="center"><input type="radio" class="radiobutton"
						name="selForums">
					</td>
					<td align="center"><span
						name="forums/forum[${flag}${index}]@seq_no"><x:out
								select="$forum/@seq_no" /></span>
					</td>
					<td align="center"><c:set var="date" scope="page">
							<x:out select="$forum/date" />
						</c:set> <input value="${date}" label="活动时间"
						id="forum_date_[${flag}${index}]"
						name="forums/forum[${flag}${index}]/date"
						class="required date input_text " style="width: 70px" />
					</td>
					<td align="center"><input
						name="forums/forum[${flag}${index}]/cname"
						class="input_text required" maxlength=50 style="width:90%"
						label="活动名称" value="<x:out select="$forum/cname"/>" />
					</td>
					<td align="center"><input
						name="forums/forum[${flag}${index}]/people_sum"
						class="input_text required"
						onfocus="InitInput.setNumber(this,7,0,0)" style="text-align:right;  width: 100px"
						label="参加人数" value="<x:out select="$forum/people_sum"/>" />
					</td>

					<td align="center"><input
						name="forums/forum[${flag}${index}]/org_name"
						class="input_text required" maxlength=50 style="width: 100px"
						label="联合举办单位" value="<x:out select="$forum/org_name"/>" />
					</td>
					<td align="center"><input
						name="forums/forum[${flag}${index}]/budget"
						class="input_text required"
						onfocus="InitInput.setNumber(this,7,4,2)"
						onchange="countTable('tblForums','budget_total',6)"
						style="text-align: right; width: 100px" label="举办经费"
						value="<x:out select="$forum/budget"/>" />
					</td>



				</tr>
				<c:set value="${index+1}" var="index" scope="page" />
			</x:forEach>
			<script type="text/javascript">
				showAllDateTag("tblForums");
			</script>
	</tbody>
</table>
<br>

<table width="98%" align="center">
	<tr>
		<td><input class="button" name="cmdAddbefore" type=button
			value="添加"
			onclick="addNewRow('tblForums');showDateTag('tblForums');getLength('tblForums','forum_sum');">
			<input class="button" name="cmdMovePrev" type=button value="上移"
			onclick="movePrev('tblForums','selForums')"> <input
			class="button" name="cmdMoveNext" type=button value="下移"
			onclick="moveNext('tblForums','selForums')"> <input
			class="button" name="cmddel" type=button value="删除"
			onclick="deleteSelectedRow('tblForums','上年度开展大型知识产权论坛、研讨会');getLength('tblForums','forum_sum');countTable('tblForums','budget_total',6);">
		</td>
	</tr>
</table>

<br>
<div class="t_bar">
	上年度为无锡市单位提供发明专利交易中介服务且交易成功的数量：<input
		type="text" name="trades/trade_sum" id="trade_sum" class=" gray"
		disabled label="场次" style="text-align:right; width: 100px;"
		value="<x:out select="$xmlData/data/trades/trade_sum" />" />件
</div>
<table id="tblTrades" cellpadding="0" class="table01" width="100%"
	border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;">
	<thead>
		<tr style="border: 1px solid #B7D1E6">
		    <th class="TblHead" align="center" width="5%">选择</th>
			<th class="TblHead" align="center" width="5%">序号</th>
			<th class="TblHead" align="center" width="15%">交易时间</th>
			<th class="TblHead" align="center" width="10%">交易形式</th>
			<th class="TblHead" align="center" width="15%">达成交易的发明专利名称</th>
			<th class="TblHead" align="center" width="10%">专利号</th>
			<th class="TblHead" align="center" width="15%">让与（许可）放名称</th>
			<th class="TblHead" align="center" width="15%">受让（被许可）放名称</th>
			<th class="TblHead" align="center" width="10%">交易金额<br/>（万元）</th>

		</tr>
	</thead>
	<tbody id="tab">
		<tr style="display: none">
			<td width="5%" align="center"><input type="radio" class="radiobutton"
				name="selTrades">
			</td>
			<td align="center" width="5%"><span name="trades|trade[0]@seq_no">[index]</span>
			</td>
			<td align="center" width="15%"><input name="trades|trade[0]|date"
				id="trade_date_[0]" label="交易时间" value=""
				class=" required input_text date " style="width: 70px" />
			</td>
			<td align="center" width="10%"><input name="trades|trade[0]|form"
				class="input_text required" maxlength=50 style="width: 60px"
				label="交易形式" value="">
			</td>
			<td align="center" width="15%"><input name="trades|trade[0]|cname"
				class="input_text required" maxlength=50 style="width: 100px"
				label="达成交易的发明专利名称" value="">
			</td>
			<td align="center" width="10%"><input
				name="trades|trade[0]|zhuanli_no" class="input_text required"
				style="width: 80px" label="专利号" maxlength=50 value="">
			</td>
			<td align="center" width="15%"><input name="trades|trade[0]|ry_name"
				class="input_text required" maxlength=50 style="width: 100px"
				label="让与（许可）放名称" value="">
			</td>
			<td align="center" width="15%"><input name="trades|trade[0]|sr_name"
				class="input_text required" maxlength=50 style="width: 100px"
				label="受让（被许可）放名称" value="">
			</td>
			<td align="center" width="10%"><input name="trades|trade[0]|budget"
				class="input_text required" maxlength=50
				onfocus="InitInput.setNumber(this,7,4,2)"
				style="text-align: right; width: 60px" label="交易金额" value="">
			</td>



			<c:set value="0" var="index" scope="page" />
			<x:forEach select="$xmlData/data/trades/trade" var="trade">

				<c:choose>
					<c:when test="${index<10}">
						<c:set value="0" var="flag" scope="page" />
					</c:when>
					<c:otherwise>
						<c:set value="" var="flag" scope="page" />
					</c:otherwise>
				</c:choose>
				<tr>
					<td width="5%"align="center"><input type="radio" class="radiobutton"
						name="selTrades">
					</td>
					<td align="center" width="5%"><span
						name="trades/trade[${flag}${index}]@seq_no"><x:out
								select="$trade/@seq_no" /></span>
					</td>
					<td align="center" width="15%"><c:set var="date" scope="page"><x:out select="$trade/date" /></c:set>
						<input value="${date}" label="交易时间"
						id="trade_date_[${flag}${index}]"
						name="trades/trade[${flag}${index}]/date"
						class="required date input_text " style="width: 70px" />
					</td>
					<td align="center" width="10%"><input
						name="trades/trade[${flag}${index}]/form"
						class="input_text required" maxlength=50 style="width: 60px"
						label="交易形式" value="<x:out select="$trade/form"/>" />
					</td>
					<td align="center" width="15%"><input
						name="trades/trade[${flag}${index}]/cname"
						class="input_text required" maxlength=50 style="width: 100px"
						label="达成交易的发明专利名称" value="<x:out select="$trade/cname"/>" />
					</td>
					<td align="center" width="10%"><input
						name="trades/trade[${flag}${index}]/zhuanli_no"
						class="input_text required" maxlength=50 style="width: 80px"
						label="专利号" value="<x:out select="$trade/zhuanli_no"/>" />
					</td>
					<td align="center" width="15%"><input
						name="trades/trade[${flag}${index}]/ry_name"
						class="input_text required" maxlength=50 style="width: 100px"
						label="让与（许可）放名称" value="<x:out select="$trade/ry_name"/>" />
					</td>
					<td align="center" width="15%"><input
						name="trades/trade[${flag}${index}]/sr_name"
						class="input_text required" maxlength=50 style="width: 100px"
						label="受让（被许可）放名称" value="<x:out select="$trade/sr_name"/>" />
					</td>
					<td align="center" width="10%"><input
						name="trades/trade[${flag}${index}]/budget"
						class="input_text required"
						onfocus="InitInput.setNumber(this,7,4,2)"
						style="text-align: right; width: 60px" label="交易金额"
						value="<x:out select="$trade/budget"/>" />
					</td>



				</tr>
				<c:set value="${index+1}" var="index" scope="page" />
			</x:forEach>
			<script type="text/javascript">
				showAllDateTag("tblTrades");
			</script>
	</tbody>
</table>
<br>

<table width="98%" align="center">
	<tr>
		<td><input class="button" name="cmdAddbefore" type=button
			value="添加"
			onclick="addNewRow('tblTrades');showDateTag('tblTrades');getLength('tblTrades','trade_sum');">
			<input class="button" name="cmdMovePrev" type=button value="上移"
			onclick="movePrev('tblTrades','selTrades')"> <input
			class="button" name="cmdMoveNext" type=button value="下移"
			onclick="moveNext('tblTrades','selTrades')"> <input
			class="button" name="cmddel" type=button value="删除"
			onclick="deleteSelectedRow('tblTrades','上年度为无锡市单位提供发明专利交易中介服务且交易成功');getLength('tblTrades','trade_sum');">
		</td>
	</tr>
</table>
<br>
<div class="t_bar">
	上年度为无锡市单位提供发明专利融资中介服务且融资成功的数量：<input
		type="text" name="financings/financing_sum" id="financing_sum"
		class=" gray" disabled label="场次" style="text-align:right; width: 100px;"
		value="<x:out select="$xmlData/data/financings/financing_sum" />" />件
</div>
<table id="tblFinancings" cellpadding="0" class="table01" width="100%"
	border="0" cellpadding="0" style="*border-bottom: #a1c0dc 1px solid;">
	<thead>
		<tr style="border: 1px solid #B7D1E6">
			<th class="TblHead" align="center" width="5%">选择</th>
			<th class="TblHead" align="center" width="5%">序号</th>
			<th class="TblHead" align="center" width="15%">达成融资协议时间</th>
			<th class="TblHead" align="center" width="10%">交易形式</th>
			<th class="TblHead" align="center" width="15%">达成融资的发明专利名称</th>
			<th class="TblHead" align="center" width="10%">专利号</th>
			<th class="TblHead" align="center" width="15%">融资方名称</th>
			<th class="TblHead" align="center" width="15%">放款方名称</th>
			<th class="TblHead" align="center" width="10%">融资金额<br/>（万元）</th>

		</tr>
	</thead>
	<tbody id="tab">
		<tr style="display: none">
			<td width="5%" align="center"><input type="radio" class="radiobutton"
				name="selFinancings">
			</td>
			<td align="center" width="5%"><span
				name="financings|financing[0]@seq_no">[index]</span></td>
			<td align="center" width="15%"><input
				name="financings|financing[0]|date" id="financing_date_[0]"
				label="达成融资协议时间" value="" class=" required input_text date "
				style="width: 70px" /></td>
			<td align="center" width="10%"><input
				name="financings|financing[0]|form" class="input_text required"
				maxlength=50 style="width: 60px" label="交易形式" value="">
			</td>
			<td align="center" width="15%"><input
				name="financings|financing[0]|cname" class="input_text required"
				maxlength=50 style="width: 100px" label="达成融资的发明专利名称" value="">
			</td>
			<td align="center" width="10%"><input
				name="financings|financing[0]|zhuanli_no"
				class="input_text required" style="width: 80px" label="专利号"
				maxlength=50 value="">
			</td>
			<td align="center" width="15%"><input
				name="financings|financing[0]|rzf_name" class="input_text required"
				maxlength=50 style="width: 100px" label="融资方名称" value="">
			</td>
			<td align="center" width="15%"><input
				name="financings|financing[0]|fkf_name" class="input_text required"
				maxlength=50 style="width: 100px" label="放款方名称" value="">
			</td>
			<td align="center" width="10%"><input
				name="financings|financing[0]|budget" class="input_text required"
				maxlength=50 onfocus="InitInput.setNumber(this,7,4,2)"
				style="text-align: right; width: 60px" label="融资金额" value="">
			</td>
            <c:set value="0" var="index" scope="page" />
			<x:forEach select="$xmlData/data/financings/financing"
				var="financing">
				<c:choose>
					<c:when test="${index<10}">
						<c:set value="0" var="flag" scope="page" />
					</c:when>
					<c:otherwise>
						<c:set value="" var="flag" scope="page" />
					</c:otherwise>
				</c:choose>
				<tr>
					<td width="5%" align="center"><input type="radio"
						class="radiobutton" name="selFinancings">
					</td>
					<td align="center" width="5%"><span
						name="financings/financing[${flag}${index}]@seq_no"><x:out
								select="$financing/@seq_no" /></span>
					</td>
					<td align="center" width="15%"><c:set var="date"
							scope="page"><x:out select="$financing/date" /></c:set>
					<input value="${date}" label="达成融资协议时间"
						id="financing_date_[${flag}${index}]"
						name="financings/financing[${flag}${index}]/date"
						class="required date input_text " style="width: 70px" />
					</td>
					<td align="center" width="10%"><input
						name="financings/financing[${flag}${index}]/form"
						class="input_text required" maxlength=50 style="width: 60px"
						label="交易形式" value="<x:out select="$financing/form"/>" />
					</td>
					<td align="center" width="15%"><input
						name="financings/financing[${flag}${index}]/cname"
						class="input_text required" maxlength=50 style="width: 100px"
						label="达成融资的发明专利名称" value="<x:out select="$financing/cname"/>" />
					</td>
					<td align="center" width="10%"><input
						name="financings/financing[${flag}${index}]/zhuanli_no"
						class="input_text required" maxlength=50 style="width: 80px"
						label="专利号" value="<x:out select="$financing/zhuanli_no"/>" />
					</td>
					<td align="center" width="15%"><input
						name="financings/financing[${flag}${index}]/rzf_name"
						class="input_text required" maxlength=50 style="width: 100px"
						label="融资方名称" value="<x:out select="$financing/rzf_name"/>" />
					</td>
					<td align="center" width="15%"><input
						name="financings/financing[${flag}${index}]/fkf_name"
						class="input_text required" maxlength=50 style="width: 100px"
						label="放款方名称" value="<x:out select="$financing/fkf_name"/>" />
					</td>
					<td align="center" width="10%"><input
						name="financings/financing[${flag}${index}]/budget"
						class="input_text required"
						onfocus="InitInput.setNumber(this,7,4,2)"
						style="text-align: right; width: 60px" label="融资金额"
						value="<x:out select="$financing/budget"/>" />
					</td>
				</tr>
				<c:set value="${index+1}" var="index" scope="page" />
			</x:forEach>
			<script type="text/javascript">
				showAllDateTag("tblFinancings");
			</script>
	</tbody>
</table>
<br>

<table width="98%" align="center">
	<tr>
		<td><input class="button" name="cmdAddbefore" type=button
			value="添加"
			onclick="addNewRow('tblFinancings');showDateTag('tblFinancings');getLength('tblFinancings','financing_sum');">
			<input class="button" name="cmdMovePrev" type=button value="上移"
			onclick="movePrev('tblFinancings','selFinancings')"> <input
			class="button" name="cmdMoveNext" type=button value="下移"
			onclick="moveNext('tblFinancings','selFinancings')"> <input
			class="button" name="cmddel" type=button value="删除"
			onclick="deleteSelectedRow('tblFinancings','上年度为无锡市单位提供发明专利融资中介服务且融资成功');getLength('tblFinancings','financing_sum');">
		</td>
	</tr>
</table>
<script type="text/javascript">
/**
	 * 计算动态列表的数量
	 * @param tblId  表id
	 * @param id 赋给某个值的id 
	  */
	function getLength(tableId,id)
	{
		var maxLinNum=$("#"+tableId+" tr").length-2;
		$("#"+id).val(maxLinNum);
	}
</script>




